<?php
/*
+-----------------------------------------------------------------------------+
| $Id: *.php,v 1.* 2005/07/01 06:15:08 Bleakwind Exp $
| SnowStats
|         --- A Web Statistics Analysis for multiuser
| Copyright (c) 2003-2005 Weaverdream.com By Bleakwind
| http://www.weaverdream.com
+-----------------------------------------------------------------------------+
*/

include_once 'include/include.php';
include_once 'include/header.php';
?>

<table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#5E94DD" align="center">
  <tr bgcolor="#5E94DD">
	<td bgcolor="#FFFFFF" valign="top">

<?php
if(empty($_GET['act'])){ header("location:prompt.php"); }

if(empty($_GET['page']) || $_GET['page'] <= 0){$page = 1;}else{$page = (int)$_GET['page'];}
$perpage      = 10;// How many record Paginal
$record_first = $perpage * ($page - 1);// First record of current page

switch($_GET['act']){
case "js_picture":

$file_list     = return_dir("images/js_picture/");
$total_record = count($file_list);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#EBE9ED"><tr><td><img src="images/arrowright.gif" border=0 align="absmiddle"> <a href="index.php" target="_self"><font style="color:#000000;"><?php echo CONFIG_WEBSITE;?></font></a> &raquo; <?php echo $LANGUAGE['image_js_picture_place'];?></td></tr></table>
<br>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#FFFFFF">
  <tr align="center" bgcolor="#5E94DD"><td height="20" colspan="2" class="right_title"><?php echo $LANGUAGE['image_js_picture_title'];?>(<?php echo $total_record;?>)</td></tr>
  <tr bgcolor="#B9CFF0"> 
    <td width="100" height="20" align="center"><?php echo $LANGUAGE['image_js_picture_id'];?></td>
    <td width="660" height="20" align="center"><?php echo $LANGUAGE['image_js_picture_view'];?></td>
  </tr>
  <tr bgcolor=#EBE9ED>
    <td width=100 height=20 align=center>default</td>
    <td width=660 height=20><img src="images/js_picture/default/1.gif" border=0><img src="images/js_picture/default/2.gif" border=0><img src="images/js_picture/default/3.gif" border=0><img src="images/js_picture/default/4.gif" border=0><img src="images/js_picture/default/5.gif" border=0><img src="images/js_picture/default/6.gif" border=0><img src="images/js_picture/default/7.gif" border=0><img src="images/js_picture/default/8.gif" border=0><img src="images/js_picture/default/9.gif" border=0><img src="images/js_picture/default/0.gif" border=0></td>
  </tr>

<?php
for($i=0;$i<$perpage;$i++){
   $record_now = $record_first+$i;
   if($record_now<$total_record){
       if($file_list[$record_now] != "default"){
          echo "<tr bgcolor=#EBE9ED>";
          echo "<td width=100 height=20 align=center>".$file_list[$record_now]."</td>";
          echo "<td width=660 height=20><img src=images/js_picture/".$file_list[$record_now]."/1.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/2.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/3.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/4.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/5.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/6.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/7.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/8.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/9.gif border=0><img src=images/js_picture/".$file_list[$record_now]."/0.gif border=0></td>";
          echo "</tr>";
       }
   }
}
echo "<tr align='center' bgcolor='#5E94DD'><td height='20' colspan='2' align='right'>";
pagination("image.php?act=js_picture&",$total_record,$perpage);
echo "</td></tr></table>";

break;
case "js_icon":

$file_list     = return_dir("images/js_icon/");
$total_record = count($file_list);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#EBE9ED"><tr><td><img src="images/arrowright.gif" border=0 align="absmiddle"> <a href="index.php" target="_self"><font style="color:#000000;"><?php echo CONFIG_WEBSITE;?></font></a> &raquo; <?php echo $LANGUAGE['image_js_icon_place'];?></td></tr></table>
<br>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#FFFFFF">
  <tr align="center" bgcolor="#5E94DD"><td height="20" colspan="2" class="right_title"><?php echo $LANGUAGE['image_js_icon_title'];?>(<?php echo $total_record;?>)</td></tr>
  <tr bgcolor="#B9CFF0"> 
    <td width="100" height="20" align="center"><?php echo $LANGUAGE['image_js_icon_id'];?></td>
    <td width="660" height="20" align="center"><?php echo $LANGUAGE['image_js_icon_view'];?></td>
  </tr>
  <tr bgcolor=#EBE9ED>
    <td width=100 height=20 align=center>default.gif</td>
    <td width=660 height=20><img src="images/js_icon/default.gif" border=0></td>
  </tr>
<?php
for($i=0;$i<$perpage;$i++){
   $record_now = $record_first+$i;
   if($record_now<$total_record){
       if(trim($file_list[$record_now]) != "default.gif"){
           echo "<tr bgcolor=#EBE9ED>";
           echo "<td width=100 height=20 align=center>".$file_list[$record_now]."</td>";
           echo "<td width=660 height=20><img src='images/js_icon/".$file_list[$record_now]."' border=0></td>";
           echo "</tr>";
       }
   }
}
echo "<tr align='center' bgcolor='#5E94DD'><td height='20' colspan='2' align='right'>";
pagination("image.php?act=js_icon&",$total_record,$perpage);
echo "</td></tr></table>";

break;
case "image_custom":

$file_list     = return_dir("images/image_custom/");
$total_record = count($file_list);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#EBE9ED"><tr><td><img src="images/arrowright.gif" border=0 align="absmiddle"> <a href="index.php" target="_self"><font style="color:#000000;"><?php echo CONFIG_WEBSITE;?></font></a> &raquo; <?php echo $LANGUAGE['image_image_custom_place'];?></td></tr></table>
<br>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#FFFFFF">
  <tr align="center" bgcolor="#5E94DD"><td height="20" colspan="2" class="right_title"><?php echo $LANGUAGE['image_image_custom_title'];?>(<?php echo $total_record;?>)</td></tr>
  <tr bgcolor="#B9CFF0"> 
    <td width="100" height="20" align="center"><?php echo $LANGUAGE['image_image_custom_id'];?></td>
    <td width="660" height="20" align="center"><?php echo $LANGUAGE['image_image_custom_view'];?></td>
  </tr>
  <tr bgcolor=#EBE9ED>
    <td width=100 height=20 align=center>default.png</td>
    <td width=660 height=20><img src="images/image_custom/default.png" border=0></td>
  </tr>
<?php
for($i=0;$i<$perpage;$i++){
   $record_now = $record_first+$i;
   if($record_now<$total_record){
       if(trim($file_list[$record_now]) != "default.png"){
           echo "<tr bgcolor=#EBE9ED>";
           echo "<td width=100 height=20 align=center>".$file_list[$record_now]."</td>";
           echo "<td width=660 height=20><img src='images/image_custom/".$file_list[$record_now]."' border=0></td>";
           echo "</tr>";
       }
   }
}
echo "<tr align='center' bgcolor='#5E94DD'><td height='20' colspan='2' align='right'>";
pagination("image.php?act=image_custom&",$total_record,$perpage);
echo "</td></tr></table>";

break;

default:
   header("location:prompt.php");
break;

}//swich

echo "<br></td></tr></table>";
include_once 'include/footer.php';
?>
